﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Shared/default.master" AutoEventWireup="true" CodeFile="login.aspx.cs" Inherits="Shared_login" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<title>用户登录</title>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
	function cEmail(){
	    var email = $("#ctl00_ContentPlaceHolder1_email").val();
	    var pass = $("#ctl00_ContentPlaceHolder1_pass").val();
	   var isemail=(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/);
       if (email=="")
       {
          $("#gjz").html("");
          $("#gjz").html("请输入邮件地址");
          return false;
       }
       if (email.length>25)
       {
          $("#gjz").html("");
          $("#gjz").html("邮件地址过长");
          return false
       }
       if (!isemail.test(email))
       { 
          $("#gjz").html("");
          $("#gjz").html("邮件地址不合法");
          return false;
       }
       //return check_login(email,pass);
       return true;
	}
	
function check_login(email,pass){
	$.post("/shopuser/checkuserhave/"+email+"/"+pass, function(data){
		if(data){
			$("#loginForm").submit();		
		}
		else{
		  $("#gjz").html("");
          $("#gjz").html("用户名密码错误");
		}
    })
    return false;
};
	
	        
//--><!]]>
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<form method="post" id="loginForm">
<div><!--主体部分开始-->
<div class="liuc">
	<div class="liuc_l">
		<div class="l_top"></div>
		<div class="login_area">
			<h3>登录</h3>
			<ul class="login_area_cont">
				<li><label>Email</label><span><input id="email" runat="server" type="text" name="mail" class="liuc_input2" value="" /></span></li>
				<li><label>密码</label><span><input id="pass" type="password" runat="server" name="pass" class="liuc_input2" value="" /><em><a href="forgetpassword.aspx" >忘记密码</a></em></span></li>
				<li class="login_area_cont_small2" id="gjz"></li>
				<li class="login_area_cont_small"><input name="auto_login" id="auto_login" runat="server" type="checkbox" value="0" />下次自动登录</li>
				<li class="login_area_cont_small"><input name="op" type="submit" onclick="return cEmail()" runat="server"  onserverclick="Button1_Click" class="liuc_but4" value="登录" /></li>
			</ul>
		</div>
		<div class="l_bot"></div>
	</div>
	<div class="login_r">
		<h5>没有5151团帐户？</h5>
		<p>十秒钟快速<em><a href='/Shared/register.aspx<%= "?ReturnUrl="+Request["ReturnUrl"] %>' >注册</a></em></p>
		<div class="login_r_bot"></div>
	</div>
</div>
<!--主体部分结束-->
</div></form>
</asp:Content>

